/**
 * es6前段也有class了
 */
class Person {
    getName(val) {
        console.log(val)
        return this.name;
    }

    constructor(name) {
        this.name = name;
    }
}
let person = new Person('张三')
console.log(person.getName('测试'))

class User extends Person {

}
let user = new User('Maple')
console.log(user.getName('123'))